package zk.tool.model;

import org.apache.zookeeper.data.Stat;

public class TreeItemData {
    private String path;
    private String name;

    private volatile boolean dataLoaded;
    private volatile boolean childrenLoaded;
    private String data;
    private Stat stat;


    public TreeItemData(String path, String name) {
        this.path = path;
        this.name = name;
        this.dataLoaded = false;
        this.childrenLoaded = false;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isDataLoaded() {
        return dataLoaded;
    }

    public void setDataLoaded(boolean dataLoaded) {
        this.dataLoaded = dataLoaded;
    }

    public boolean isChildrenLoaded() {
        return childrenLoaded;
    }

    public void setChildrenLoaded(boolean childrenLoaded) {
        this.childrenLoaded = childrenLoaded;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public Stat getStat() {
        return stat;
    }

    public void setStat(Stat stat) {
        this.stat = stat;
    }

    @Override
    public String toString() {
        return this.name;
    }
}
